You are a senior biostatistician specializing in medical research, Analysis of Covariance (ANCOVA), IBM SPSS-style reporting, and publication-ready statistical analysis.

I will upload a Microsoft Excel file containing simulated patient-level blood-pressure data.

Your task is to perform a complete one-way ANCOVA and return the final results as a professionally formatted Microsoft Word document with editable SPSS-style tables.

# 1. DATA STRUCTURE

Read the following worksheet:

ANCOVA_Data

Use exactly these variables:

- Patient identifier: Patient_ID
- Treatment group: Group
- Baseline covariate: Baseline_SBP_mmHg
- Final outcome: Final_SBP_mmHg

Group coding:

- Control = reference/control group
- Drug_A = treatment group A
- Drug_B = treatment group B

Variable roles:

- Dependent variable: Final_SBP_mmHg
- Fixed factor: Group
- Covariate: Baseline_SBP_mmHg

Measurement unit:

- Baseline and final systolic blood pressure: mmHg

Do not include Patient_ID as a predictor in any statistical model.

# 2. DATA VALIDATION

Before analysis:

1. Confirm that all required columns exist.
2. Confirm that Baseline_SBP_mmHg and Final_SBP_mmHg are numeric.
3. Confirm that Group contains only Control, Drug_A, and Drug_B.
4. Check for missing values, duplicate patient identifiers, non-numeric values, impossible or extreme blood-pressure values, and empty groups.
5. Report the number of valid and excluded observations.
6. Do not silently correct, replace, or impute data.
7. Use complete-case analysis unless otherwise specified.
8. Clearly state that the dataset is simulated and must not be interpreted as real clinical evidence.

# 3. DESCRIPTIVE STATISTICS

For each treatment group, calculate the following separately for Baseline_SBP_mmHg and Final_SBP_mmHg:

- N
- Mean
- Standard Deviation
- Standard Error
- Minimum
- Maximum
- Median
- 95% Confidence Interval for the Mean

Create an editable SPSS-style table titled:

Descriptive Statistics

Use three decimal places.

# 4. PRIMARY ANCOVA MODEL

The primary standard ANCOVA model is:

Final_SBP_mmHg = Group + Baseline_SBP_mmHg + Error

The main clinical question is:

After adjusting for baseline systolic blood pressure, is final systolic blood pressure significantly different between the treatment groups and the control group?

Use Control as the reference group.
Use Type III sums of squares.

Set:

- Significance level: alpha = 0.05
- Confidence level: 95%

# 5. CHECK HOMOGENEITY OF REGRESSION SLOPES

Before interpreting the standard ANCOVA, fit the interaction model:

Final_SBP_mmHg = Group + Baseline_SBP_mmHg + Group × Baseline_SBP_mmHg + Error

Test the overall interaction:

Group × Baseline_SBP_mmHg

Create an SPSS-style table titled:

Test of Homogeneity of Regression Slopes

Report:

- Source
- Type III Sum of Squares
- df
- Mean Square
- F
- Sig.
- Partial Eta Squared

Decision rule:

If interaction p >= 0.05:

- Conclude that the homogeneity-of-regression-slopes assumption is not violated.
- Remove the interaction term.
- Fit and interpret the standard ANCOVA model.

If interaction p < 0.05:

- Conclude that the treatment effect depends on baseline systolic blood pressure.
- Do not interpret a single constant main effect of Group.
- Retain the interaction model.
- Estimate treatment-versus-control effects at clinically meaningful covariate values within the observed common range:
  - Mean baseline SBP
  - Mean - 1 SD
  - Mean + 1 SD
- Report simple effects with estimated difference, Standard Error, 95% Confidence Interval, and multiplicity-adjusted p-value.
- Clearly explain that the treatment effect varies according to baseline SBP.

# 6. LINEARITY

Assess whether the relationship between baseline and final systolic blood pressure is approximately linear within each group.

Produce a scatterplot containing:

- X-axis: Baseline_SBP_mmHg
- Y-axis: Final_SBP_mmHg
- Separate colors for each group
- Separate regression lines for each group
- Clear axis titles including mmHg
- A professional, publication-ready appearance

Do not use polynomial terms unless the linearity assumption is clearly violated.

# 7. RESIDUAL DIAGNOSTICS

Using the selected final model, assess the following assumptions.

## Normality of residuals

Report:

- Shapiro-Wilk test
- Q-Q plot
- Histogram of standardized residuals

Interpret normality primarily using the plots and residual distribution, not only the Shapiro-Wilk p-value.

## Homogeneity of residual variances

Perform a Levene or Brown-Forsythe test on model residuals across treatment groups.

Create an SPSS-style table titled:

Levene's Test of Equality of Error Variances

Report:

- F
- df1
- df2
- Sig.

Decision rule:

- If p >= 0.05, use the conventional ANCOVA inference.
- If p < 0.05, do not switch to ordinary Welch ANOVA because it ignores the baseline covariate.
- Instead, use a heteroscedasticity-robust ANCOVA based on HC3 robust standard errors or an equivalent robust linear-model procedure.
- Clearly identify robust results as robust ANCOVA results.

## Influential observations

Assess:

- Standardized or studentized residuals
- Leverage
- Cook's distance

Flag potentially influential observations, but do not automatically delete them.

If influential observations are found:

- Report their Patient_ID.
- Explain why they were flagged.
- Retain them unless there is a documented data error.
- If necessary, provide a sensitivity analysis with and without influential observations.

# 8. STANDARD ANCOVA OUTPUT

If the interaction is not significant, create an editable SPSS-style table titled:

Tests of Between-Subjects Effects

Use exactly these columns:

Source | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta Squared

Include at least these rows:

- Corrected Model
- Intercept
- Baseline_SBP_mmHg
- Group
- Error
- Corrected Total

Report values using three decimal places.

Formatting rules:

- Display p-values smaller than 0.001 as <0.001.
- Never display 0.000.
- Report partial eta squared as Partial Eta Squared.
- Do not invent or approximate statistical values.

# 9. PARAMETER ESTIMATES

Create an editable SPSS-style table titled:

Parameter Estimates

Use exactly these columns:

Parameter | B | Std. Error | t | Sig. | 95% CI Lower Bound | 95% CI Upper Bound

Use Control as the reference category.

Include:

- Intercept
- Baseline SBP coefficient
- Drug_A versus Control coefficient
- Drug_B versus Control coefficient

Interpret the sign correctly:

- A negative treatment coefficient means lower adjusted final systolic blood pressure compared with Control.
- A positive coefficient means higher adjusted final systolic blood pressure compared with Control.

# 10. ADJUSTED MEANS

Estimate final systolic blood pressure for each group after adjustment for baseline SBP.

Evaluate adjusted means at the overall observed mean of Baseline_SBP_mmHg.

Create an editable SPSS-style table titled:

Estimated Marginal Means

Use exactly these columns:

Group | Adjusted Mean | Std. Error | 95% CI Lower Bound | 95% CI Upper Bound

Include:

- Control
- Drug_A
- Drug_B

Clearly distinguish raw final means from adjusted final means.

# 11. TREATMENT-VERSUS-CONTROL COMPARISONS

Compare:

- Drug_A versus Control
- Drug_B versus Control

Use multiplicity-adjusted treatment-versus-control contrasts based on adjusted marginal means.

Preferred correction:

- Dunnett adjustment

If a true Dunnett adjustment is unavailable:

- Apply the Holm correction only to the treatment-versus-control comparisons.
- Explicitly label the correction as Holm.
- Do not incorrectly call Holm-adjusted results Dunnett results.

Create an editable SPSS-style table titled:

Pairwise Comparisons Versus Control

Use exactly these columns:

Treatment | Reference Group | Adjusted Mean Difference | Std. Error | Adjusted Sig. | 95% CI Lower Bound | 95% CI Upper Bound

Define the difference as:

Treatment - Control

Interpretation:

- A negative difference indicates lower adjusted final systolic blood pressure in the treatment group.
- A positive difference indicates higher adjusted final systolic blood pressure in the treatment group.

# 12. EFFECT SIZE

For the overall adjusted group effect, report partial eta squared (eta-p-squared).

Use the following descriptive interpretation only as a general guide:

- Approximately 0.01 = small
- Approximately 0.06 = medium
- Approximately 0.14 = large

Do not equate statistical effect size automatically with clinical importance.

For treatment-versus-control comparisons, also report adjusted differences in mmHg with 95% confidence intervals.

# 13. FIGURES

Include the following figures in the Word document:

Figure 1: Baseline versus final SBP

- Scatterplot
- Separate groups
- Group-specific regression lines
- Used to assess linearity and slope homogeneity

Figure 2: Adjusted means

- Adjusted mean final SBP for each group
- 95% confidence interval error bars
- Control group clearly identifiable
- Y-axis labeled Adjusted Final SBP (mmHg)

Figure 3: Residual Q-Q plot

- Based on residuals from the selected final model

Use a clean medical-journal visual style.

# 14. WORD OUTPUT REQUIREMENTS

The main deliverable must be a Microsoft Word .docx file.

All tables must be:

- Fully editable
- SPSS-style
- Full-grid bordered
- Professionally aligned
- Clearly titled
- Numbered sequentially
- Formatted with three decimal places
- Free of clipped or overlapping content

Use English SPSS table titles and column names.
Write the statistical interpretation in clear Persian.
Do not place narrative interpretation inside the statistical tables.

# 15. REQUIRED TABLE ORDER

Arrange the Word document in this exact order:

1. Data Validation Summary
2. Descriptive Statistics
3. Test of Homogeneity of Regression Slopes
4. Levene's Test of Equality of Error Variances
5. Tests of Between-Subjects Effects
6. Parameter Estimates
7. Estimated Marginal Means
8. Pairwise Comparisons Versus Control
9. Residual and Influence Diagnostics
10. Figures
11. Persian Medical Interpretation
12. Publication-Ready Results Paragraph

If interaction is significant, replace inappropriate standard ANCOVA tables with:

- Interaction model results
- Conditional treatment effects
- Simple effects at selected baseline values

# 16. PERSIAN INTERPRETATION

Provide a concise Persian interpretation covering:

- Whether the homogeneity-of-slopes assumption was satisfied
- Whether the adjusted overall group effect was significant
- Whether baseline SBP significantly predicted final SBP
- Adjusted mean of every group
- Drug_A versus Control result
- Drug_B versus Control result
- Confidence intervals
- Adjusted p-values
- Partial eta squared
- Difference between statistical significance and clinical importance
- Any assumption violation or influential observation

Do not claim that a treatment is clinically effective based only on p < 0.05.

# 17. PUBLICATION-READY PARAGRAPH

At the end of the Word document, provide one publication-ready Persian paragraph suitable for the Results section of a medical article.

The paragraph must report:

- Total sample size
- Group sample sizes
- Covariate
- Dependent variable
- Interaction test
- Overall adjusted group effect
- F statistic
- Degrees of freedom
- p-value
- Partial eta squared
- Adjusted means and 95% confidence intervals
- Adjusted treatment-versus-control differences
- Multiplicity-adjusted p-values
- Measurement unit in mmHg

# 18. FINAL QUALITY CONTROL

Before returning the Word file:

- Verify every numerical result against the fitted model.
- Confirm that all group labels are correct.
- Confirm that Control is the reference group.
- Confirm that treatment differences use Treatment - Control.
- Confirm that all p-values and confidence intervals agree across tables and narrative.
- Confirm that no table contains 0.000 as a p-value.
- Confirm that the Word file opens correctly.
- Confirm that all tables are editable.
- Confirm that no content is clipped.
- Return the Word document as the primary downloadable output.

Do not return invented SPSS results, placeholder numbers, or unsupported clinical conclusions.
